<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset={CHARSET}"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" >
<title>$navtitle</title>
<meta name="description" content="$metakeywords" />
<meta name="keywords" content="$metadescription" />
<link rel="stylesheet" href="source/plugin/aljbd/css/sj/base.css" />
<link rel="stylesheet" href="source/plugin/aljbd/css/sj/module.css" />
<script src="source/plugin/aljbd/js/jquery.js"></script>
<script type="text/javascript">
    var jq = jQuery.noConflict();
</script>

<script src="source/plugin/aljbd/js/sj/jquery.plugin.js"></script>
<link rel="stylesheet" href="source/plugin/aljbd/css/sj/plugin.css" />
{template aljbd:common}
</head>

<div id="append_parent"></div>
<body id="body">
<a name="top"></a>
{template aljbd:header}
<style type="text/css">
body {
    background: #ffffff;
}
.form-box fieldset {
    border: 0px solid #eee;
}
.form-box .form-item input[type="text"], .form-box .form-item input[type="password"], .form-box .form-item input[type="email"] {
    border: 1px solid #eee;
}
.form-box .form-item textarea {
    border: 1px solid #eee;
}
</style>
<div class="container module-review" id="mobile_body"><div class="panel-comm panel-fullsize">
    <div class="panel-body">
        <div class="form-box">
		<iframe style="display:none" name="myiframe" id="myiframe"></iframe>
            <form id="postform" name="postform" action="plugin.php?id=aljbd&act={$_GET['act']}" method="POST"
             target="myiframe">
                <input type="hidden" name="formhash" value="{FORMHASH}">
				<input type="hidden" name="gid" value="{$_GET['gid']}">
				<input type="hidden" name="bid" value="{$bid}">
				<input type="hidden" name="aljbd_goods_token" value="{eval echo create_token('aljbd_goods_token');}">
                <div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:s283}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            {eval echo dhtmlspecialchars($bd['name']);}
                        </div>
                    </fieldset>
                </div>
				<div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:s284}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            <input type="text" class="px" name="name" value="$g['name']">
                        </div>
                    </fieldset>
                </div>
				<div class="form-item">
                    <fieldset>
                        <legend>&#21830;&#21697;&#29366;&#24577;<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            <label class="lb"><input type="radio" name="state" value="0" class="pc" {if !$g['state']}checked="checked"{/if}>&#19978;&#26550;</label>
							<label class="lb"><input type="radio" name="state" value="1" class="pc" {if $g['state'] == 1}checked="checked"{/if}>&#19979;&#26550;</label>
                        </div>
                    </fieldset>
                </div>
				 <div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:s223}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            <select name="type" id="type" style="width:120px;" data-id="1" onchange="getregion(this,'goods')">
							<option value="">{lang aljbd:s224}</option>
							<!--{loop $typelist $typeid $type}-->
							<option value="$typeid" {if $typeid==$g['type']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						&nbsp;&nbsp;&nbsp;
						<span name="subtype" id="subtype">
						{if $g['subtype']}
						<select name="subtype" id="type" style="width:120px;">
							<!--{loop C::t('#aljbd#aljbd_type_goods')->fetch_all_by_upid($g['type']) $typeid $type}-->
							<option value="$typeid" {if $typeid==$g['subtype']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						{/if}
						</span>
						<span id="subtype3">
						{if $g['subtype3']}
						<select name="subtype3" style="width:120px;">
							<!--{loop C::t('#aljbd#aljbd_type_goods')->fetch_all_by_upid($g['subtype']) $typeid $type}-->
							<option value="$typeid" {if $typeid==$g['subtype3']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						{/if}
						</span>
                        </div>
                    </fieldset>
                </div>
				<script type="text/javascript">
				function getregion(t,u){
					var url ='';
					if(u){
						url = '&type='+u;
					}
					if(u !='u'){
						var name = 'subtype3';
						if(jq(t).attr('data-id') == 1){
							var name = 'subtype';
						}
					}else{
						var name = 'region1';
						if(jq(t).attr('data-id') == 1){
							var name = 'subregion';
						}
					}
					var str = '<select name="'+name+'" onchange="getregion(this,\''+u+'\')" style="width:120px;"><option value="">\u8bf7\u9009\u62e9</option>';
					jq.post('plugin.php?id=$pluginid&act=linkage&upid='+jq(t).val()+url,function(data){
						if(data){
							jq.each(data,function(k,d){
							str+='<option value="'+k+'">'+d+'</option>';
							});
							str+='</select>';
							jq(t).next().remove();
							jq(t).after(str);
						}

					}, "json");
				}
				</script>
                <div class="form-item">
                    <fieldset>
                        <legend>
                            {if !file_exists("source/plugin/dz_1/dz_1.inc.php")}
                                {lang aljbd:s285}
                            {else}
                            &#38646;&#21806;&#20215;&#26684;
                            {/if}
                            <span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            <input type="text"  name="price1" value="$g['price1']">

                        </div>
                    </fieldset>
                </div>
				<div class="form-item">
                    <fieldset>
                        <legend>
                            {if !file_exists("source/plugin/dz_1/dz_1.inc.php")}
                                {lang aljbd:s286}
                            {else}
                            &#20379;&#36135;&#20215;&#26684;
                            {/if}
                            :
                        </legend>
                        <div class="item-inline">
                            <input type="text"  name="price2" value="$g['price2']">
                        </div>
                    </fieldset>
                </div>
                {if file_exists("source/plugin/dz_3/dz_3.inc.php")}
                {template dz_3:addgoods}
                {/if}
				<div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:amount}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            <input type="text" class="px" name="amount" value="$g['amount']">
                        </div>
                    </fieldset>
                </div>
				{if $_G['cache']['plugin']['aljgwc'][$pluginid] && !file_exists("source/plugin/dz_1/dz_1.inc.php")}
				<div class="form-item">
                    <fieldset>
                        <legend>&#36816;&#36153;<span class="txt-warning">&nbsp;</span>:</legend>
                        <div class="item-inline">
						<select name="fare_desc" id="fare_desc">
                            {loop $fare_desc $k $v}
							<option {if $g[fare_desc] == $k && $g[fare_desc]!='999999'}selected{/if}value="$k">$v
							{/loop}
							<option value="999999" {if $g[fare_desc]=='999999'}selected{/if}>&#33258;&#23450;&#20041;&#37038;&#36153;
						</select>
                        </div>
                    </fieldset>
                </div>
				<div class="form-item" {if $g[fare_desc]!='999999'}style="display:none"{/if} id="fare">
                    <fieldset>
                        <legend>&#36816;&#36153;&#37329;&#39069;<span class="txt-warning">&nbsp;</span>:</legend>
                        <div class="item-inline">
                            <input type="text" class="px" name="fare" value="$g['fare']">
                        </div>
                    </fieldset>
                </div>
				<script type="text/javascript">
				jq('#fare_desc').change(function() {
					if(jq("#fare_desc").val()=='999999'){
						jq("#fare").show();
					}else{
						jq("#fare").hide();
					}
				});
				</script>
                {elseif file_exists("source/plugin/dz_1/dz_1.inc.php")}
                {template dz_1:addgoods}
				{/if}
                {if !file_exists("source/plugin/dz_1/dz_1.inc.php")}
				<div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:tg112}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            <input type="date" class="px" name="endtime"  value="{if $g['endtime']}{eval echo gmdate('Y-m-d',$g['endtime']+8*3600);}{/if}" style="width: 100%;border: 1px solid #eee;line-height: 28px;padding: 1px 2px;height: 28px;">&nbsp;{lang aljbd:Time_annotation}
                        </div>
                    </fieldset>
                </div>
                {/if}
                {if file_exists("source/plugin/dz_4/dz_4.inc.php")}
                    {eval $shoppic = array('pic1','pic2','pic3','pic4','pic5','pic6','pic7','pic8','pic9','pic10','pic11','pic12');}
                {else}
                    {eval $shoppic = array('pic1','pic2','pic3','pic4','pic5');}
                {/if}
				{eval $i = 1}
				{loop $shoppic $v}
					<div class="form-item">
						<fieldset>
							<legend>{lang aljbd:s287}{$i}{if $v == 'pic1'}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>{/if}:</legend>
							<div class="item-inline">
								<span id="$v"><input type="file"  name="{$v}" onchange="lrz_mobile('$v',this)" style="width:220px;"></span>
                                {if file_exists("source/plugin/dz_4/dz_4.inc.php")}
                                {if $v=='pic1'}
                                &#27491;&#38754;
                                {elseif $v=='pic2'}
                                &#27491;&#38754;1
                                {elseif $v=='pic3'}
                                &#27491;&#38754;2
                                {elseif $v=='pic4'}
                                &#27491;&#38754;3
                                {elseif $v=='pic5'}
                                &#27491;&#38754;4
                                {elseif $v=='pic6'}
                                &#32972;&#38754;1
                                {elseif $v=='pic7'}
                                &#32972;&#38754;2
                                {elseif $v=='pic8'}
                                &#32972;&#38754;3
                                {elseif $v=='pic9'}
                                &#32972;&#38754;4
                                {elseif $v=='pic10'}
                                &#20391;&#38754;1
                                {elseif $v=='pic11'}
                                &#20391;&#38754;2
                                {elseif $v=='pic12'}
                                &#32972;&#38754;
                                {/if}
                                {else}
                                {if $v == 'pic1'}&#23553;&#38754;&#22270;&#29255;{else}&#35814;&#24773;&#22270;{/if}
                                {/if}
                                <span id="img_{$v}"><br>{if $g[$v]}<img src="$g[$v]" width="80" height="80">{/if}</span>
							</div>
						</fieldset>
					</div>
				{eval $i++}
				{/loop}

				{if !$settings['good_wurl']['value'] && !file_exists("source/plugin/dz_1/dz_1.inc.php")}
				<div class="form-item">
                    <fieldset>
                       <legend>{lang aljbd:gwurl_1}</legend>
                        <div class="item-inline">
                            <input type="text" name="gwurl" class="pt" id="replymessage" style="background:#FFF;" value="{$g['gwurl']}">&nbsp;{lang aljbd:gwurl_2}
                        </div>

                    </fieldset>
                </div>
                {/if}

                <div class="form-item">
                    <fieldset>
						<legend for="review_content">{lang aljbd:s288}:</legend>

						<textarea name="intro"  id="intro" >$g['intro']</textarea>

                    </fieldset>
                </div>
                                <div class="form-submit">
                    <div class="btn-group-vertical full-width">
                        <button type="submit" name="submit" value="Y" class="btn btn-mycolor">{lang aljbd:sj_dianping_12}</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<style type="text/css">
#calendar {
    padding: 5px;
    text-align: left;
    border: 1px solid #DDD;
    background: #FFF;
    margin-bottom: 0.8em;
}
#calendar_year {
    display: none;
    line-height: 130%;
    background: #FFF;
    position: absolute;
    z-index: 10;
}
#calendar_month {
    display: none;
    background: #FFF;
    line-height: 130%;
    border: 1px solid #DDD;
    padding: 4px;
    position: absolute;
    z-index: 11;
}
</style>
<script type="text/javascript">
function tips(txt, fun) {
	jq('.tips').remove();
	var div = jq('<div style="background: url(source/plugin/aljbd/images/tips.png);max-width: 85%;min-height: 77px;min-width: 270px;position: absolute;left: -1000px;top: -1000px;text-align: center;border-radius:10px;"><span style="color: #ffffff;line-height: 77px;font-size: 23px;">' + txt + '</span></div>');
	jq('body').append(div);
	div.css('zIndex', 9999999);
	div.css('left', parseInt((jq(window).width() - div.width()) / 2));
	var top = parseInt(jq(window).scrollTop() + (jq(window).height() - div.height()) / 2);
	div.css('top', top);
	setTimeout(function() {
		div.remove();
		if (fun) {
			fun();
		}
	}, 2000);
}

</script>
<SCRIPT LANGUAGE="JavaScript">

function countChoices(obj)
{
	var inputs = document.getElementsByName("businesstype[]");

	var checked_counts = 0;

	for(var i=0;i<inputs.length;i++){
		if(inputs[i].checked){
			checked_counts++;
		}
	}
	max = 3;
	if (checked_counts > max) {
		alert("{lang aljbd:dianping_3}" + max + "{lang aljbd:dianping_4}");
		obj.checked = false;
	}
} //-->
</script>
</div>
{template aljbd:img_js}
{template aljbd:footer}
</body>
</html>
